-- CALC_BINE_COST

-- 魔藤操作消耗
-- @param action    操作类型
-- @param classId   植物id
return function(action, classId)

    if action == "level_up" then
        local bine = ME.user.bine;
        local level = bine:getLevel();
        local num;
        -- 升级魔藤
        if level < 10 then
            num = 10;
        elseif level < 20 then
            num = 15;
        else
            num = 20;
        end

        -- 属性降低消耗
        local prop = PropM.combine(ME.user, "reduce_cost", "seed");
        num = PropM.apply(prop, num);

        return { [7010] = num, };
    elseif action == "cure" then
        -- 恢复魔藤
        return { [7010] = 5, };
    elseif action == "revive" then
        -- 复活魔藤
        return { [7011] = 1, };
    elseif action == "plant" then
        -- 种植魔藤
        local seed = BineM.query(classId, "seed");
        return { [seed] = 1, };
    else
        return {};
    end
end
